package com.aerospace.resourcepath;

/**
 * @ClassName ResourcePath
 * @Description
 * @Author yuhang11
 * @Date 2022/1/17 2:42 下午
 * @Version 1.0
 */
public class ResourcePath {
    public static void main(String[] args) {
        System.out.println(ResourcePath.class.getResource("").getPath());
        System.out.println(ResourcePath.class.getResource(".").getPath());
        System.out.println(ResourcePath.class.getResource("../").getPath());
        System.out.println(ResourcePath.class.getResource("/").getPath());
//        System.out.println(ResourcePath.class.getResource("a.txt").getPath());
//        System.out.println(ResourcePath.class.getResource("/file1.txt").getPath());
        System.out.println(ResourcePath.class.getClassLoader().getResource("").getPath());
        System.out.println(ResourcePath.class.getClassLoader().getResource(".").getPath());
        System.out.println(ResourcePath.class.getClassLoader().getResource(".").getPath());
    }
}
